<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .cate {
            list-style: none;
            margin: 0 auto;
        }
        .cate li {
            background-color: purple;
            color: whitesmoke;
            float: left;
            border-radius: 4px;
            width: 80px;
            text-align: center;
        }
        /* 不同屏幕下的效果 */
        @media (min-width: 1200px) {
            .cate li {
                color: whitesmoke;
            }
        }
        @media (min-width: 768px) and (max-width: 1199px) {
            .cate li:nth-of-type(5) {
                display: none;
            }
        }
        @media (min-width: 468px) and (max-width: 767px) {
            .cate li:nth-of-type(5) {
                display: none;
            }
            .cate li:nth-of-type(4) {
                display: none;
            }
        }
        @media (max-width: 467px) {
            .cate li:nth-of-type(5) {
                display: none;
            }
            .cate li:nth-of-type(4) {
                display: none;
            }
            .cate li:nth-of-type(3) {
                display: none;
            }
        }
    </style>
</head>
<body>
    <ul class="cate">
        <li>小说</li>
        <li>青春动漫</li>
        <li>经济管理</li>
        <li>历史文化</li>
        <li>人文社科</li>
    </ul>
</body>
</html>